/**
 * editorContext.commands.line_height方法没找到
 */
import { Heading as OriginalHeading } from "element-tiptap";
import CustomMenuButton from './MenuButton.vue'

export default class Heading extends OriginalHeading {
    constructor(option = {}) {
        super(option)
        this.lineHeights = option.lineHeights || [100,200,300]
    }
    menuBtnView(editorContext) {
        return {
            component: CustomMenuButton,
            componentProps: {
                lineHeights: this.lineHeights,
                // isActive: editorContext.isActive.line_height()
            },
            componentEvents: {
                command(lineHeights) {
                    // console.log(editorContext.commands.line_height)
                    // console.log(lineHeights)
                }
            }
        };
    }
}